import java.util.*;

/**
 * @author LKQ
 * @date 2022/4/17 16:20
 * @description
 */
public class Solution {
    public static void main(String[] args) {

    }
    public long waysToBuyPensPencils(int total, int cost1, int cost2) {
        int pen = total / cost1;
        long sum = 0;
        for (int i = 0; i <= pen; i++) {
            int cost = cost1 * i;
            if (total - cost >= 0) {
                sum += (total - cost) / cost2 + 1;
            }
        }
        return sum;
    }
}
